﻿<UserControl x:Class="SoftSource.Timecard.Views.ManagementView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             xmlns:softsourceConverters="clr-namespace:SoftSource.Common.Converters;assembly=SoftSource.Common.Silverlight"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignWidth="509"
             d:DesignHeight="433">

    <UserControl.Resources>
        <softsourceConverters:ObjectToVisibilityConverter x:Key="ObjectToVisibilityConverter" />
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <controls:TabControl TabStripPlacement="Left">
            <controls:TabItem Header="Projects"
                              Visibility="{Binding ManageProjects, Converter={StaticResource ObjectToVisibilityConverter}}"
                              IsSelected="True">
                <ContentControl HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                x:Name="ProjectsContent" />
            </controls:TabItem>
            <controls:TabItem Header="Users"
                              Visibility="{Binding ManageUsers, Converter={StaticResource ObjectToVisibilityConverter}}">
                <ContentControl HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                x:Name="UsersContent" />
            </controls:TabItem>
            <controls:TabItem Header="Categories"
                              Visibility="{Binding ManageCategories, Converter={StaticResource ObjectToVisibilityConverter}}">
                <ContentControl HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                x:Name="CategoriesContent" />
            </controls:TabItem>
            <controls:TabItem Header="Invoicing"
                              Visibility="{Binding ManageInvoices, Converter={StaticResource ObjectToVisibilityConverter}}">
                <ContentControl HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                x:Name="InvoicingContent" />
            </controls:TabItem>
            <controls:TabItem Header="Timecards"
                              Visibility="{Binding ManageTimecards, Converter={StaticResource ObjectToVisibilityConverter}}">
                <ContentControl HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                x:Name="TimecardsContent" />
            </controls:TabItem>
            <controls:TabItem Header="Customers"
                              Visibility="{Binding ManageCustomers, Converter={StaticResource ObjectToVisibilityConverter}}">
                <ContentControl HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                x:Name="CustomersContent" />
            </controls:TabItem>
            <controls:TabItem Header="Milestones"
                              Visibility="{Binding ManageMilestones, Converter={StaticResource ObjectToVisibilityConverter}}">
                <ContentControl HorizontalContentAlignment="Stretch"
                                VerticalContentAlignment="Stretch"
                                x:Name="MilestonesContent" />
            </controls:TabItem>
        </controls:TabControl>

    </Grid>
</UserControl>